function [x, favl, exitflag, output, lambda] = maxret(a,b,c,d,e,f,g,h,i,k,m)

[x, favl, exitflag, output, lambda] = fmincon(@main, a, b, c, d, e, f, g,@nlc);

  function f = main(x)
        f = -(m)*(x);
  end

  function [c,ceq]=nlc(x)
        c= var((i)*x) - var(k);
        ceq=0;
  end

end 
